<?php

namespace app\common\validate;

use think\Validate;

class Apply extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'type' => 'require',
        'name' => 'require',
        'mobile' => 'require|regex:1[3-9]\d{9}',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'type.require' => '请选择申请类型',
        'name.require' => '联系人不能为空',
        'mobile.require' => '请填写正确手机号',
        'mobile.regex' => '手机号不能为空',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [],
        'edit' => [],
    ];
    
}
